# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=rofi-calc
pkgver=2.2.0
pkgrel=1
pkgdesc="Do calculations in rofi"
arch=('loong64' 'x86_64')
url="https://github.com/svenstaro/rofi-calc"
license=(MIT)
depends=('rofi' 'libqalculate')
install=$pkgname.install
source=($pkgname-$pkgver.tar.gz::https://github.com/svenstaro/rofi-calc/archive/v${pkgver}.tar.gz)
sha512sums=('7eedb5c7be97f42a1683cabdf0745c28d2a4f123f02e7cf2bf5a44cf851271b5bdc31f7622f4f30d086ecdcbcc7e4d62d3550b8c5b8ceebcdaca362e8d09a68d')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  autoreconf -i
  mkdir build
}

build() {
  cd "$srcdir/$pkgname-$pkgver/build"

  ../configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver/build"

  make DESTDIR="$pkgdir/" install

  install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
